package com.glsc.ngateway.common.base.domain.mysql.flowable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 节点人员初始化表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "t_flowable_assignee")
@Inheritance(strategy = InheritanceType.JOINED)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
public class FlowableAssignee implements Serializable {

    @ApiModelProperty(value = "唯一编号")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "l_id", columnDefinition = "int comment '唯一编号'")
    private Integer id;

    @ApiModelProperty(value = "流程定义key")
    @Column(name = "vc_process_definition_key", columnDefinition = "varchar(100) '")
    private String processDefinitionKey;

    @ApiModelProperty(value = "任务定义key")
    @Column(name = "vc_task_definition_key", columnDefinition = "varchar(100) '")
    private String taskDefinitionKey;

    @ApiModelProperty(value = "待办人变量，例userGroup")
    @Column(name = "vc_assignee_variable", columnDefinition = "varchar(100) '")
    private String assigneeVariable;

    @ApiModelProperty(value = "第三方系统编号，例amprod")
    @Column(name = "vc_sysid", columnDefinition = "varchar(2048) '")
    private String sysid;

    @ApiModelProperty(value = "角色名称，例amprod.role.产品经理")
    @Column(name = "vc_role_name", columnDefinition = "varchar(2048) '")
    private String roleName;

    @ApiModelProperty(value = "待办人名称，例lm1,lm2,lm3")
    @Column(name = "vc_assignee_name", columnDefinition = "varchar(2048) '")
    private String assigneeName;

    @ApiModelProperty(value = "类型，例0用assigneename，1用rolename")
    @Column(name = "c_type", columnDefinition = "varchar(5) '")
    private String type;

}
